package com.znsd.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;

/**
 * <p>
 * 分类表
 * </p>
 *
 * @author Liuyl
 * @since 2019-10-16
 */
@TableName("base_catalog")
public class BaseCatalog extends Model<BaseCatalog> {

    private static final long serialVersionUID = 1L;

    /**
     * 编号Id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 分类名称
     */
    private String name;
    /**
     * 父级Id（0：最高级父级）
     */
    @TableField("parent_id")
    private Integer parentId;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "BaseCatalog{" +
        "id=" + id +
        ", name=" + name +
        ", parentId=" + parentId +
        "}";
    }
}
